3.1.11 \(\int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx\) [11]

3.1.11.1 Optimal result
3.1.11.2 Mathematica [A] (verified)
3.1.11.3 Rubi [A] (verified)
3.1.11.4 Maple [A] (verified)
3.1.11.5 Fricas [A] (verification not implemented)
3.1.11.6 Sympy [A] (verification not implemented)
3.1.11.7 Maxima [A] (verification not implemented)
3.1.11.8 Giac [F]
3.1.11.9 Mupad [B] (verification not implemented)

3.1.11.1 Optimal result

Integrand size = 23, antiderivative size = 152 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=\frac {i b d^2 x}{2 c^2}-\frac {4 b d^2 x^2}{15 c}-\frac {1}{6} i b d^2 x^3+\frac {1}{20} b c d^2 x^4-\frac {i b d^2 \arctan (c x)}{2 c^3}+\frac {1}{3} d^2 x^3 (a+b \arctan (c x))+\frac {1}{2} i c d^2 x^4 (a+b \arctan (c x))-\frac {1}{5} c^2 d^2 x^5 (a+b \arctan (c x))+\frac {4 b d^2 \log \left (1+c^2 x^2\right )}{15 c^3} \]

output
1/2*I*b*d^2*x/c^2-4/15*b*d^2*x^2/c-1/6*I*b*d^2*x^3+1/20*b*c*d^2*x^4-1/2*I* 
b*d^2*arctan(c*x)/c^3+1/3*d^2*x^3*(a+b*arctan(c*x))+1/2*I*c*d^2*x^4*(a+b*a 
rctan(c*x))-1/5*c^2*d^2*x^5*(a+b*arctan(c*x))+4/15*b*d^2*ln(c^2*x^2+1)/c^3
 
3.1.11.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.76 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=\frac {d^2 \left (2 a c^3 x^3 \left (10+15 i c x-6 c^2 x^2\right )+b c x \left (30 i-16 c x-10 i c^2 x^2+3 c^3 x^3\right )+2 b \left (-15 i+10 c^3 x^3+15 i c^4 x^4-6 c^5 x^5\right ) \arctan (c x)+16 b \log \left (1+c^2 x^2\right )\right )}{60 c^3} \]

input
Integrate[x^2*(d + I*c*d*x)^2*(a + b*ArcTan[c*x]),x]
 
output
(d^2*(2*a*c^3*x^3*(10 + (15*I)*c*x - 6*c^2*x^2) + b*c*x*(30*I - 16*c*x - ( 
10*I)*c^2*x^2 + 3*c^3*x^3) + 2*b*(-15*I + 10*c^3*x^3 + (15*I)*c^4*x^4 - 6* 
c^5*x^5)*ArcTan[c*x] + 16*b*Log[1 + c^2*x^2]))/(60*c^3)
 
3.1.11.3 Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.86, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {5407, 27, 2333, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx\)

\(\Big \downarrow \) 5407

\(\displaystyle -b c \int \frac {d^2 x^3 \left (-6 c^2 x^2+15 i c x+10\right )}{30 \left (c^2 x^2+1\right )}dx-\frac {1}{5} c^2 d^2 x^5 (a+b \arctan (c x))+\frac {1}{2} i c d^2 x^4 (a+b \arctan (c x))+\frac {1}{3} d^2 x^3 (a+b \arctan (c x))\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {1}{30} b c d^2 \int \frac {x^3 \left (-6 c^2 x^2+15 i c x+10\right )}{c^2 x^2+1}dx-\frac {1}{5} c^2 d^2 x^5 (a+b \arctan (c x))+\frac {1}{2} i c d^2 x^4 (a+b \arctan (c x))+\frac {1}{3} d^2 x^3 (a+b \arctan (c x))\)

\(\Big \downarrow \) 2333

\(\displaystyle -\frac {1}{30} b c d^2 \int \left (-6 x^3+\frac {15 i x^2}{c}+\frac {16 x}{c^2}+\frac {15 i-16 c x}{c^3 \left (c^2 x^2+1\right )}-\frac {15 i}{c^3}\right )dx-\frac {1}{5} c^2 d^2 x^5 (a+b \arctan (c x))+\frac {1}{2} i c d^2 x^4 (a+b \arctan (c x))+\frac {1}{3} d^2 x^3 (a+b \arctan (c x))\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {1}{5} c^2 d^2 x^5 (a+b \arctan (c x))+\frac {1}{2} i c d^2 x^4 (a+b \arctan (c x))+\frac {1}{3} d^2 x^3 (a+b \arctan (c x))-\frac {1}{30} b c d^2 \left (\frac {15 i \arctan (c x)}{c^4}-\frac {15 i x}{c^3}+\frac {8 x^2}{c^2}-\frac {8 \log \left (c^2 x^2+1\right )}{c^4}+\frac {5 i x^3}{c}-\frac {3 x^4}{2}\right )\)

input
Int[x^2*(d + I*c*d*x)^2*(a + b*ArcTan[c*x]),x]
 
output
(d^2*x^3*(a + b*ArcTan[c*x]))/3 + (I/2)*c*d^2*x^4*(a + b*ArcTan[c*x]) - (c 
^2*d^2*x^5*(a + b*ArcTan[c*x]))/5 - (b*c*d^2*(((-15*I)*x)/c^3 + (8*x^2)/c^ 
2 + ((5*I)*x^3)/c - (3*x^4)/2 + ((15*I)*ArcTan[c*x])/c^4 - (8*Log[1 + c^2* 
x^2])/c^4))/30
 

3.1.11.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2333
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ 
ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] 
&& PolyQ[Pq, x] && IGtQ[p, -2]
 

rule 5407
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x 
_))^(q_.), x_Symbol] :> With[{u = IntHide[(f*x)^m*(d + e*x)^q, x]}, Simp[(a 
 + b*ArcTan[c*x])   u, x] - Simp[b*c   Int[SimplifyIntegrand[u/(1 + c^2*x^2 
), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ 
[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]) 
)
 
3.1.11.4 Maple [A] (verified)

Time = 1.19 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.81

method result size
parts \(a \,d^{2} \left (-\frac {1}{5} c^{2} x^{5}+\frac {1}{2} i c \,x^{4}+\frac {1}{3} x^{3}\right )+\frac {b \,d^{2} \left (-\frac {c^{5} x^{5} \arctan \left (c x \right )}{5}+\frac {i \arctan \left (c x \right ) c^{4} x^{4}}{2}+\frac {c^{3} x^{3} \arctan \left (c x \right )}{3}+\frac {i c x}{2}+\frac {c^{4} x^{4}}{20}-\frac {i c^{3} x^{3}}{6}-\frac {4 c^{2} x^{2}}{15}+\frac {4 \ln \left (c^{2} x^{2}+1\right )}{15}-\frac {i \arctan \left (c x \right )}{2}\right )}{c^{3}}\) \(123\)
derivativedivides \(\frac {a \,d^{2} \left (-\frac {1}{5} c^{5} x^{5}+\frac {1}{2} i c^{4} x^{4}+\frac {1}{3} c^{3} x^{3}\right )+b \,d^{2} \left (-\frac {c^{5} x^{5} \arctan \left (c x \right )}{5}+\frac {i \arctan \left (c x \right ) c^{4} x^{4}}{2}+\frac {c^{3} x^{3} \arctan \left (c x \right )}{3}+\frac {i c x}{2}+\frac {c^{4} x^{4}}{20}-\frac {i c^{3} x^{3}}{6}-\frac {4 c^{2} x^{2}}{15}+\frac {4 \ln \left (c^{2} x^{2}+1\right )}{15}-\frac {i \arctan \left (c x \right )}{2}\right )}{c^{3}}\) \(129\)
default \(\frac {a \,d^{2} \left (-\frac {1}{5} c^{5} x^{5}+\frac {1}{2} i c^{4} x^{4}+\frac {1}{3} c^{3} x^{3}\right )+b \,d^{2} \left (-\frac {c^{5} x^{5} \arctan \left (c x \right )}{5}+\frac {i \arctan \left (c x \right ) c^{4} x^{4}}{2}+\frac {c^{3} x^{3} \arctan \left (c x \right )}{3}+\frac {i c x}{2}+\frac {c^{4} x^{4}}{20}-\frac {i c^{3} x^{3}}{6}-\frac {4 c^{2} x^{2}}{15}+\frac {4 \ln \left (c^{2} x^{2}+1\right )}{15}-\frac {i \arctan \left (c x \right )}{2}\right )}{c^{3}}\) \(129\)
parallelrisch \(\frac {-12 c^{5} b \,d^{2} \arctan \left (c x \right ) x^{5}+30 i x^{4} \arctan \left (c x \right ) b \,c^{4} d^{2}-12 a \,c^{5} d^{2} x^{5}+30 i x^{4} a \,c^{4} d^{2}+3 b \,c^{4} d^{2} x^{4}-10 i x^{3} b \,c^{3} d^{2}+20 x^{3} \arctan \left (c x \right ) b \,d^{2} c^{3}+20 a \,c^{3} d^{2} x^{3}-16 b \,c^{2} d^{2} x^{2}+30 i b \,d^{2} x c -30 i b \,d^{2} \arctan \left (c x \right )+16 b \ln \left (c^{2} x^{2}+1\right ) d^{2}}{60 c^{3}}\) \(166\)
risch \(\frac {i d^{2} b \left (6 c^{2} x^{5}-15 i c \,x^{4}-10 x^{3}\right ) \ln \left (i c x +1\right )}{60}-\frac {i d^{2} c^{2} b \,x^{5} \ln \left (-i c x +1\right )}{10}-\frac {a \,c^{2} d^{2} x^{5}}{5}+\frac {i a c \,d^{2} x^{4}}{2}-\frac {d^{2} c \,x^{4} b \ln \left (-i c x +1\right )}{4}+\frac {i d^{2} b \,x^{3} \ln \left (-i c x +1\right )}{6}+\frac {b c \,d^{2} x^{4}}{20}-\frac {i b \,d^{2} x^{3}}{6}+\frac {a \,d^{2} x^{3}}{3}-\frac {4 b \,d^{2} x^{2}}{15 c}+\frac {i b \,d^{2} x}{2 c^{2}}-\frac {i b \,d^{2} \arctan \left (c x \right )}{2 c^{3}}+\frac {4 b \,d^{2} \ln \left (c^{2} x^{2}+1\right )}{15 c^{3}}\) \(203\)

input
int(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)
 
output
a*d^2*(-1/5*c^2*x^5+1/2*I*x^4*c+1/3*x^3)+b*d^2/c^3*(-1/5*c^5*x^5*arctan(c* 
x)+1/2*I*arctan(c*x)*c^4*x^4+1/3*c^3*x^3*arctan(c*x)+1/2*I*c*x+1/20*c^4*x^ 
4-1/6*I*c^3*x^3-4/15*c^2*x^2+4/15*ln(c^2*x^2+1)-1/2*I*arctan(c*x))
 
3.1.11.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.05 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=-\frac {12 \, a c^{5} d^{2} x^{5} + 3 \, {\left (-10 i \, a - b\right )} c^{4} d^{2} x^{4} - 10 \, {\left (2 \, a - i \, b\right )} c^{3} d^{2} x^{3} + 16 \, b c^{2} d^{2} x^{2} - 30 i \, b c d^{2} x - 31 \, b d^{2} \log \left (\frac {c x + i}{c}\right ) - b d^{2} \log \left (\frac {c x - i}{c}\right ) - {\left (-6 i \, b c^{5} d^{2} x^{5} - 15 \, b c^{4} d^{2} x^{4} + 10 i \, b c^{3} d^{2} x^{3}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{60 \, c^{3}} \]

input
integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="fricas")
 
output
-1/60*(12*a*c^5*d^2*x^5 + 3*(-10*I*a - b)*c^4*d^2*x^4 - 10*(2*a - I*b)*c^3 
*d^2*x^3 + 16*b*c^2*d^2*x^2 - 30*I*b*c*d^2*x - 31*b*d^2*log((c*x + I)/c) - 
 b*d^2*log((c*x - I)/c) - (-6*I*b*c^5*d^2*x^5 - 15*b*c^4*d^2*x^4 + 10*I*b* 
c^3*d^2*x^3)*log(-(c*x + I)/(c*x - I)))/c^3
 
3.1.11.6 Sympy [A] (verification not implemented)

Time = 1.92 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.64 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=- \frac {a c^{2} d^{2} x^{5}}{5} - \frac {4 b d^{2} x^{2}}{15 c} + \frac {i b d^{2} x}{2 c^{2}} - \frac {b d^{2} \left (- \frac {\log {\left (47 b c d^{2} x - 47 i b d^{2} \right )}}{60} - \frac {49 \log {\left (47 b c d^{2} x + 47 i b d^{2} \right )}}{120}\right )}{c^{3}} - x^{4} \left (- \frac {i a c d^{2}}{2} - \frac {b c d^{2}}{20}\right ) - x^{3} \left (- \frac {a d^{2}}{3} + \frac {i b d^{2}}{6}\right ) + \left (\frac {i b c^{2} d^{2} x^{5}}{10} + \frac {b c d^{2} x^{4}}{4} - \frac {i b d^{2} x^{3}}{6}\right ) \log {\left (i c x + 1 \right )} + \frac {\left (- 12 i b c^{5} d^{2} x^{5} - 30 b c^{4} d^{2} x^{4} + 20 i b c^{3} d^{2} x^{3} + 13 b d^{2}\right ) \log {\left (- i c x + 1 \right )}}{120 c^{3}} \]

input
integrate(x**2*(d+I*c*d*x)**2*(a+b*atan(c*x)),x)
 
output
-a*c**2*d**2*x**5/5 - 4*b*d**2*x**2/(15*c) + I*b*d**2*x/(2*c**2) - b*d**2* 
(-log(47*b*c*d**2*x - 47*I*b*d**2)/60 - 49*log(47*b*c*d**2*x + 47*I*b*d**2 
)/120)/c**3 - x**4*(-I*a*c*d**2/2 - b*c*d**2/20) - x**3*(-a*d**2/3 + I*b*d 
**2/6) + (I*b*c**2*d**2*x**5/10 + b*c*d**2*x**4/4 - I*b*d**2*x**3/6)*log(I 
*c*x + 1) + (-12*I*b*c**5*d**2*x**5 - 30*b*c**4*d**2*x**4 + 20*I*b*c**3*d* 
*2*x**3 + 13*b*d**2)*log(-I*c*x + 1)/(120*c**3)
 
3.1.11.7 Maxima [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 174, normalized size of antiderivative = 1.14 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=-\frac {1}{5} \, a c^{2} d^{2} x^{5} + \frac {1}{2} i \, a c d^{2} x^{4} - \frac {1}{20} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{2} d^{2} + \frac {1}{3} \, a d^{2} x^{3} + \frac {1}{6} i \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c d^{2} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d^{2} \]

input
integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="maxima")
 
output
-1/5*a*c^2*d^2*x^5 + 1/2*I*a*c*d^2*x^4 - 1/20*(4*x^5*arctan(c*x) - c*((c^2 
*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^2 + 1)/c^6))*b*c^2*d^2 + 1/3*a*d^2*x^3 + 1 
/6*I*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*c 
*d^2 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d^2
 
3.1.11.8 Giac [F]

\[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=\int { {\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )} x^{2} \,d x } \]

input
integrate(x^2*(d+I*c*d*x)^2*(a+b*arctan(c*x)),x, algorithm="giac")
 
output
sage0*x
 
3.1.11.9 Mupad [B] (verification not implemented)

Time = 0.82 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.92 \[ \int x^2 (d+i c d x)^2 (a+b \arctan (c x)) \, dx=-\frac {\frac {d^2\,\left (-16\,b\,\ln \left (c^2\,x^2+1\right )+b\,\mathrm {atan}\left (c\,x\right )\,30{}\mathrm {i}\right )}{60}+\frac {4\,b\,c^2\,d^2\,x^2}{15}-\frac {b\,c\,d^2\,x\,1{}\mathrm {i}}{2}}{c^3}+\frac {d^2\,\left (20\,a\,x^3+20\,b\,x^3\,\mathrm {atan}\left (c\,x\right )-b\,x^3\,10{}\mathrm {i}\right )}{60}-\frac {c^2\,d^2\,\left (12\,a\,x^5+12\,b\,x^5\,\mathrm {atan}\left (c\,x\right )\right )}{60}+\frac {c\,d^2\,\left (a\,x^4\,30{}\mathrm {i}+3\,b\,x^4+b\,x^4\,\mathrm {atan}\left (c\,x\right )\,30{}\mathrm {i}\right )}{60} \]

input
int(x^2*(a + b*atan(c*x))*(d + c*d*x*1i)^2,x)
 
output
(d^2*(20*a*x^3 - b*x^3*10i + 20*b*x^3*atan(c*x)))/60 - ((d^2*(b*atan(c*x)* 
30i - 16*b*log(c^2*x^2 + 1)))/60 + (4*b*c^2*d^2*x^2)/15 - (b*c*d^2*x*1i)/2 
)/c^3 - (c^2*d^2*(12*a*x^5 + 12*b*x^5*atan(c*x)))/60 + (c*d^2*(a*x^4*30i + 
 3*b*x^4 + b*x^4*atan(c*x)*30i))/60